package cn.bdqn.declaresystem.serviceImpl;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import cn.bdqn.declaresystem.dao.SystemUserDao;
import cn.bdqn.declaresystem.pojo.Group;
import cn.bdqn.declaresystem.service.SystemUserService;

@Service
public class SystemUserServiceImpl implements SystemUserService {

	@Resource
	private SystemUserDao systemUserDao;

	@Override
	public boolean haveGroup(Group group) throws Exception {
		Group _group = systemUserDao.haveGroup(group);
		if (_group == null)
			return false;
		else
			return true;
	}

	@Override
	public boolean insertGroup(Group group) throws Exception {
		try {
			systemUserDao.insertGroup(group);
			return true;
		} catch (Exception e) {
			e.printStackTrace();
			return false;
		}
	}

}
